<?php
// +----------------------------------------------------------------------
// | Description: 点赞数据表
// +----------------------------------------------------------------------
// | Author: xiaoliu <528772568@qq.com>
// +----------------------------------------------------------------------
namespace app\common\model;

use think\Model;

class Like extends Model
{
    // 开启自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';
    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = false;

    //点赞
    public function video() {
        return $this->hasOne('video', 'id', 'video_id')->field('id,name,link,cover,playnum,duration,createtime');
    }
   
}
